package cn.yunyichina.provider.framework.dubbo.service;

import cn.yunyichina.provider.framework.data.SpringContextHandler;
import cn.yunyichina.provider.iface.entity.common.Response;
import cn.yunyichina.provider.iface.entity.common.ResponseObject;
import cn.yunyichina.provider.iface.service.IOrder;

/**
 * Created by Lullaby on 2017/1/12.
 */
public class OrderService {

    static final String serviceName = "orderService";

    static IOrder iOrder = null;

    static {
        iOrder = SpringContextHandler.getBean(serviceName);
    }

    public static IOrder getOrderClient() {
        return iOrder;
    }

    public static Response callUnderlineFromInternal(String method, String data) {
        return iOrder.callUnderlineFromInternal("", method, data, (short) 0);
    }

    public static ResponseObject callUnderlineFromInternalObject(String method, String data) {
        return iOrder.callUnderlineFromInternalObject("", method, data, (short) 0);
    }

    public static Response callUnderlineFromInternal(String sessionId, String method, String data) {
        return iOrder.callUnderlineFromInternal(sessionId, method, data, (short) 0);
    }

    public static Response callHumpFromInternal(String sessionId, String method, String data) {
        return iOrder.callHumpFromInternal(sessionId, method, data, (short) 0);
    }

    public static Response callHumpFromInternal(String method, String data) {
        return iOrder.callHumpFromInternal("", method, data, (short) 0);
    }

}
